﻿using System.Diagnostics;
using System.Web.Mvc;

namespace TemaAdministration.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to the user administration portal!";

            CustomRoleProvider customRoleProvider = new CustomRoleProvider();
            bool isAdmin = customRoleProvider.IsUserInRole(HttpContext.User.Identity.Name, "admin");
            
            ViewData["isAdmin"] = isAdmin;
            ViewData["name"] = HttpContext.User.Identity.Name;


            return View();
        }

    }
}
